import request from '@/utils/request.js'
import { useTokenStore } from '@/stores/token.js'
import {ref} from "vue";

//食品添加
export const foodAddService = (foodData)=>{
    return request.post('/food/addFood',foodData);
}
//返回通过当前卖家上架的食品列表
export const foodListService = () => {
    return request.get('/food/allFoodInfo')
}
//订单信息
export const orderListService=()=>{
    return request.get('/order/allOrderInfo')
}
//返回所有食品信息
export const foodItemsService=()=>{
    return request.get('food/allFoodItems')
}
//返回单个食品信息
export const foodInfoService=(foodId)=>{
    return request.get('food/FoodInfo',{params:{foodId}})
}
//下单操作（添加order）
export const addOrderService=(orderDate)=>{
    return request.post('order/addOrder',orderDate)
}
